package com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.web;

import com.iwhalecloud.citybrain.flow.platform.manager.domain.repository.FlowCustomTitleRepository;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.FlowCustomTitleVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.iwhalecloud.citybrain.flow.platform.manager.common.ResponseResult;

import java.util.List;
import java.util.Map;

/**
 * @author lzb
 * @date 2021-11-08 17:38
 */
@RestController
@RequestMapping("/custom-title")
public class FlowCustomTitleController {

    @Autowired
    FlowCustomTitleRepository flowCustomTitleRepository;

    @ApiOperation("获取自定义标题列表")
    @RequestMapping(value = "/getCustomTitleList", method = RequestMethod.GET)
    public ResponseResult<Map<String, List<FlowCustomTitleVo>>> getCustomTitleList() {
        return ResponseResult.success(flowCustomTitleRepository.getCustomTitleList());
    }
}
